home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / JDBC / JDBC_011 / JAVA / SQL / DRIVERPR.JAV < prev    next >
Encoding:
Text File  |  1996-11-10  |  2.8 KB  |  81 lines

  1. /*
  2.  * Copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software
  5.  * and its documentation for NON-COMMERCIAL purposes and without
  6.  * fee is hereby granted provided that this copyright notice
  7.  * appears in all copies. Please refer to the file "LICENSE"
  8.  * for further important copyright and licensing information.
  9.  *
  10.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  11.  * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  12.  * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  13.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  14.  * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  15.  * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  16.  * 
  17.  * THIS SOFTWARE IS NOT DESIGNED OR INTENDED FOR USE OR RESALE AS ON-LINE
  18.  * CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE
  19.  * PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT
  20.  * NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE
  21.  * SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE
  22.  * SOFTWARE COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE
  23.  * PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES").  SUN
  24.  * SPECIFICALLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR
  25.  * HIGH RISK ACTIVITIES.
  26.  */
  27.  
  28. package java.sql;
  29.  
  30. /**
  31.  * <p>The DriverPropertyInfo class is only of interest to advanced programmers
  32.  * who need to interact with a Driver via getDriverProperties to discover
  33.  * and supply properties for connections.
  34.  */
  35.  
  36. public class DriverPropertyInfo {
  37.  
  38.     /**
  39.      * Constructor a DriverPropertyInfo with a name and value; other
  40.      * members default to their initial values.
  41.      *
  42.      * @param name the name of the property
  43.      * @param value the current value, which may be null
  44.      */
  45.     public DriverPropertyInfo(String name, String value) {
  46.         this.name = name;
  47.         this.value = value;
  48.     }
  49.  
  50.     /**
  51.      * The name of the property.
  52.      */
  53.     public String name;
  54.  
  55.     /**
  56.      * A brief description of the property.  This may be null.
  57.      */
  58.     public String description = null;
  59.  
  60.     /**
  61.      * "required" is true if a value must be supplied for this property
  62.      * during Driver.connect.  Otherwise the property is optional.
  63.      */
  64.     public boolean required = false;
  65.  
  66.     /**
  67.      * "value" specifies the current value of the property, based on a
  68.      * combination of the information supplied to getPropertyInfo, the
  69.      * Java environment, and driver supplied default values.  This
  70.      * may be null if no value is known.
  71.      */
  72.     public String value = null;
  73.  
  74.     /**
  75.      * If the value may be selected from a particular set of values,
  76.      * then this is an array of the possible values.  Otherwise it should
  77.      * be null.
  78.      */
  79.     public String[] choices = null;
  80. }
  81.